package net.wapproject.utils;


public class StringUtils {
	
	/**
	 * method convert from price input to price....<br />
	 * <b>example</b> if input is 168000 -> output is 168.000
	 * @param price
	 * @return {@link String} price is converted.
	 */
	public static String convertPrice(long price){
		int k = 0;
		String tmp = "";
		String strPrice = String.valueOf(price);
		for(int i = strPrice.length()-1; i >= 0; i--) {
			k++;
			tmp+=strPrice.charAt(i);
			if (k % 3 == 0 && k != strPrice.length()) {
				tmp+=".";
			}
		}
		strPrice = "";
		for(int i = tmp.length()-1; i >= 0; i--) {
			strPrice+=tmp.charAt(i);
		}
		return strPrice;
	}
	
	

}
